<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 函数</title>
</head>
<body>
<h2>用作变量值的函数</h2>

<p id="demo"></p>

<script>
  document.getElementById("demo").innerHTML =
          "温度是：" + toCelsius(86) + " 摄氏度。";

  function toCelsius(fahrenheit) {
    return (5/9) * (fahrenheit-32);
  }
</script>


</body>
</html>